package org.dydl.model.system;

import java.math.BigDecimal;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Created by Jack on 2018/1/26.
 */
@Entity
public class Lossdetail {
    private Long id;
    private String bomNo;
    private String name;
    private String model;
    private String unit;
    private String remarks;
    private String item;
    private String goodsUuid;
    private BigDecimal decDm = new BigDecimal(0); //损耗率
    private BigDecimal decCm =new BigDecimal(0); //单耗/净耗

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "BOM_NO")
    public String getBomNo() {
        return bomNo;
    }

    public void setBomNo(String bomNo) {
        this.bomNo = bomNo;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "MODEL")
    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    @Basic
    @Column(name = "UNIT")
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Basic
    @Column(name = "REMARKS")
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Basic
    @Column(name = "ITEM")
//    @NotNull
    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    @Basic
    @Column(name = "GOODS_UUID")
    public String getGoodsUuid() {
        return goodsUuid;
    }

    public void setGoodsUuid(String goodsUuid) {
        this.goodsUuid = goodsUuid;
    }

    @Basic
    @Column(name = "DEC_DM")
    public BigDecimal getDecDm() {
        return decDm;
    }

    public void setDecDm(BigDecimal decDm) {
        this.decDm = decDm;
    }

    @Basic
    @Column(name = "DEC_CM")
    public BigDecimal getDecCm() {
        return decCm;
    }

    public void setDecCm(BigDecimal decCm) {
        this.decCm = decCm;
    }

    public Lossdetail() {
    }

    public Lossdetail(Long id, String bomNo, String name, String model, String unit, String remarks, String item, String goodsUuid, BigDecimal decDm, BigDecimal decCm) {
        this.id = id;
        this.bomNo = bomNo;
        this.name = name;
        this.model = model;
        this.unit = unit;
        this.remarks = remarks;
        this.item = item;
        this.goodsUuid = goodsUuid;
        this.decDm = decDm;
        this.decCm = decCm;
    }
}
